

#ifndef __CE_MESHMANAGER_H__
#define __CE_MESHMANAGER_H__

#include <export.h>
#include <map>
#include <string>
#include <iobject.h>

class ceMesh;
class ceMultiMesh;

/**
 * \addtogroup engine
 * @{
 */

/**
 * @brief Manager holding mesh related resources
 */
class CE_API ceMeshManager : public iObject
{
  CE_OBJECT
private:

  std::map<std::string, ceMesh*>      _meshes;
  std::map<std::string, ceMultiMesh*>	_multiMeshes;

  static ceMeshManager* static_instance;

  ceMeshManager();
  ~ceMeshManager();
public:

  static ceMeshManager* Get ();
  static ceMeshManager* Reset (ceMeshManager* meshManager = 0);

	void AddMesh (const std::string& name, ceMesh* mesh);
	void AddMesh (const std::string& name, ceMultiMesh* mesh);

  ceMesh* GetMesh (const std::string& name, bool load=true, bool add=true);
  ceMultiMesh* GetMultiMesh (const std::string& name, bool load=true, bool add=true);
};

/** @} */

#endif /* ! __CE_MESHMANAGER_H__ */

